<%-- 指定jstl标签库前缀，引用uri--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="yanglei.day0109.lottery.po.User" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="yanglei.day0109.lottery.dao.UserDao" %>
<%@ page import="yanglei.day0109.lottery.dao.impl.UserDaoImpl" %>
<%@ page import="java.util.Map" %>
<%@ page import="java.util.HashMap" %><%--
  Created by IntelliJ IDEA.
  User: 杨雷
  Date: 2023/1/10
  Time: 9:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>EL表达式使用</title>
    <style>
        li {
            line-height: 32px;
            font-size: 20px;
        }
    </style>
</head>
<body>
<div>
    <c:out value="jstl标签库使用out输出"></c:out>
    <table>
        <tr>
            <th></th>
            <th>姓名</th>
            <th>中签编码</th>
            <th>持照状态</th>
            <th>手机号码</th>
            <th>开户日期</th>
            <th>操作</th>
        </tr>
        <%-- jstl 迭代标签(c:forEach) items="${集合数据} var="变量"
                  条件标签(c:if)  类似Java程序中单分支if
                  多分支条件判断(c:chose) 类似Java程序中多分支，c:when 可以有多个，c:otherwise 相当于Java的else
        --%>
        <c:forEach items="${userList}" var="us" varStatus="vs">
            <%-- 使用jstl中的foreach迭代标签库中的varStatus状态属性实行隔行换色 --%>
            <tr <c:if test="${vs.index%2==0}"> style="background-color: aqua;" </c:if> >
                <td>count:${vs.count}|index:${vs.index}</td>
                <td>${us.userName}</td>
                <td>${us.markNo}</td>
                    <%--<td>${us.status}</td>--%>
                <td>
                    <c:if test="${us.status eq 0}">未持照</c:if>
                    <c:if test="${us.status == 1 }">已持照</c:if>
                </td>
                <td>${us.phone}</td>
                <td>${us.openDate}</td>
                <td>
                    <a href="#">详情</a>&nbsp;<a href="#">删除</a>
                </td>
            </tr>
        </c:forEach>
    </table>
</div>
</body>
</html>
